<template>
	<view>
		<uni-list>
		    <uni-list-item  
				:title="item.AppName + item.AppVersion + '主要更新'" 
				:showArrow="true" 
				:clickable="true" 
				v-for="item in list" @click="showDetail(item.Description)">
			</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import _custom from '../../common/_custom.js'
	
	export default {
		data() {
			return {
				title: '',
				list: [],
				platform: ''
			}
		},
		onLoad() {
			uni.$on('history_version',(data) => {
				this.list = data
			})
		},
		onShow() {
			let that = this;
			// #ifdef APP-PLUS
			this.platform = uni.getSystemInfoSync().platform;
			plus.runtime.getProperty(plus.runtime.appid, function(info) {
				_custom.getDataJava({
					name: 'history_version',
					apiname: 'getAppHistoryVersion',
					apiparam: {
						appname: info.name,
						platform: that.platform
					}
				})
			})
			// #endif
		},
		methods: {
			showDetail(v) {
				let content = v.split('|').join('\n');
				uni.showModal({
					content: content,
					title: '内容',
					showCancel: false
				})
			}
		}
	}
</script>

<style>

</style>
